package org.hqs.feign.clients;

import org.hqs.feign.common.JsonResult;
import org.hqs.feign.pojo.Nurse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "nurseservice")
public interface NurseClient {
    @GetMapping("/nurse/")
    public JsonResult<List<Nurse>> getAllNurses();

    @GetMapping("/nurse/{id}")
    public JsonResult<Nurse> getNurseById(@PathVariable Long id);

    @PostMapping("/nurse/")
    public JsonResult saveNurse(@RequestBody Nurse nurse);
    @PutMapping("/nurse/{id}")
    public JsonResult updateNurse(@PathVariable Long id, @RequestBody Nurse nurse);

    @DeleteMapping("/nurse/{id}")
    public JsonResult deleteNurse(@PathVariable Long id);
}
